/**
 * Copyright(c) kyle.
 */
package org.example.tomcat.bio.basic;

/**
 * 服务抽象类
 *
 * 为了简化模型，支持两种形式
 * 实际上Post有可能被分为put之类的
 *
 * @author kyle
 * @version 1.00.00
 * @since [2020-10-20 18:11]
 * @updateUser [Kyle]
 * @updateRemark [说明本次修改内容]
 * @date [2020-10-20 18:11]
 */
public abstract class GPServlet {
 public void service(GPRequest pRequest,GPResponse pResponse) throws Exception{
  if("GET".equalsIgnoreCase(pRequest.getMethod())){
   doGet(pRequest,pResponse);
  }else {
   doPost(pRequest,pResponse);
  }
 }
 public abstract void doGet(GPRequest pRequest,GPResponse pResponse) throws Exception;
 public abstract void doPost(GPRequest pRequest,GPResponse pResponse) throws Exception;
}
